Vercel
API ReferenceMessages

Send Message (Async)

Sends a new message to an existing chat and processes it in the background. Returns immediately with the assistant message ID. Poll GET /chats/:chatId/messages/:messageId and check `finishReason` to detect completion.

POST/v2/chats/{chatId}/messages/async

Usage

TypeScript Example
import { v0 } from 'v0-sdk'const result = await v0.messages.sendAsync({  chatId: 'chat_abc123',  message: 'Hello, world!',})console.log(result)

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat.

Request Body

message: string

The prompt or instruction to send to the model.

systemPrompt?: string

System-level context for the chat, such as frameworks or development environment details.

modelConfiguration?: object

Overrides for the model behavior.

modelId: 'v0-auto' | 'v0-mini' | 'v0-pro' | 'v0-max' | 'v0-max-fast'

Model to use for the generation.

imageGenerations: boolean

Enables image generations to generate up to 5 images per version.

mcpServerIds?: string[]

MCP server IDs to enable. When omitted, uses default enabled servers.

attachments?: object[]

Files or assets to include with the message.

url: string

URL of the attachment.

skillIds?: string[]

Skill IDs (from skills.sh) to attach. Skills provide domain-specific knowledge to the AI. Maximum 3.

action?: object

An optional action. Use fix-with-v0 to trigger automatic error fixing — the message should contain the error context.

type: 'fix-with-v0'

Response

messageId: string

ID of the assistant message that will receive the response. Poll GET /chats/:chatId/messages/:messageId and check finishReason for completion.

On this page